package edu.jamestang.yeb.service;

import com.baomidou.mybatisplus.extension.service.IService;
import edu.jamestang.yeb.entity.Employee;
import edu.jamestang.yeb.util.PageResp;
import edu.jamestang.yeb.util.Resp;

import java.time.LocalDate;
import java.util.List;

/**
 * @author JamesTang
 * @date 2021/12/22 11:26
 */
public interface EmployeeService extends IService<Employee> {


    /**
     * Get all employee by page
     * @param currentPage currentPage
     * @param size size of each page
     * @param employee employee entity
     * @param dateScope use for search
     * @return Page
     */
    PageResp getEmployeeByPage(Integer currentPage, Integer size, Employee employee, LocalDate[] dateScope);

    /**
     * Get top id
     * @return Response
     */
    Resp maxWorkId();

    /**
     * Add Employee
     * @param employee employee
     * @return Response
     */
    Resp addEmployee(Employee employee);

    /**
     * Get Employee
     * @param id id
     * @return Employee list
     */
    List<Employee> getEmployee(Integer id);

    /**
     * Get Employee with Salary
     * @param currentPage current page
     * @param size item of each page
     * @return page
     */
    PageResp getEmployeeWithSalary(Integer currentPage, Integer size);
}
